//
//  LeftViewController.m
//  Corner
//
//  Created by lanou3g on 15/11/18.
//  Copyright © 2015年 Zero_Zhou. All rights reserved.
//

#import "LeftViewController.h"

#define kScreenSize           [[UIScreen mainScreen] bounds].size
#define kScreenWidth          [[UIScreen mainScreen] bounds].size.width
#define kScreenHeight         [[UIScreen mainScreen] bounds].size.height

@interface LeftViewController ()

@property(nonatomic,strong) UIButton *sinaLoginBtn; // </ 新浪微博登陆
@property(nonatomic,strong) UIButton *qqLoginBtn; // </ qq登陆
@property(nonatomic,strong) UIButton *weiChatBtmn; // </ 微信登陆

@property(nonatomic,strong) UIButton *clickBtn; // </ 点击登陆

@end

@implementation LeftViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UIImageView *imageview = [[UIImageView alloc] initWithFrame:self.view.bounds];
    imageview.image = [UIImage imageNamed:@"leftbackiamge"];
    [self.view addSubview:imageview];

    [self setBackView];
    [self setFootView];
    // Do any additional setup after loading the view.
}

-(void)setBackView{
    UIView *leftBackV = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth - 100,kScreenHeight *4/5)];
    leftBackV.backgroundColor = [UIColor clearColor];
    self.headerImageV = [[UIImageView alloc]initWithFrame:CGRectMake(35, 35, 75, 75)];
    self.headerImageV.image = [UIImage imageNamed:@"headerHodle"];
    self.headerImageV.clipsToBounds = YES;
    self.headerImageV.layer.cornerRadius = 38;
    self.headerImageV.layer.borderWidth = 2;
    self.headerImageV.layer.borderColor = [UIColor colorWithWhite:0.800 alpha:1.000].CGColor;
    self.clickBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    self.clickBtn.frame = CGRectMake(123, 55, 60, 30);
    self.clickBtn.tintColor = [UIColor blackColor];
    [self.clickBtn setTitle:@"点击登陆" forState:UIControlStateNormal];
    UILabel *tLab = [[UILabel alloc]initWithFrame:CGRectMake(20, 170, 240, 30)];
    tLab.textColor = [UIColor whiteColor];
    tLab.text = @"快捷登录方式";
    tLab.textAlignment = NSTextAlignmentCenter;
    self.sinaLoginBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    self.sinaLoginBtn.frame = CGRectMake(60, 210, 160, 45);
    [self.sinaLoginBtn setTitle:@"微博登录" forState:UIControlStateNormal];
    self.sinaLoginBtn.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.sinaLoginBtn.layer.cornerRadius = 10;
    self.sinaLoginBtn.layer.masksToBounds = YES;
    [self.sinaLoginBtn setBackgroundColor:[UIColor whiteColor]];
    self.sinaLoginBtn.layer.borderColor = [UIColor redColor].CGColor;
    
    self.qqLoginBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    self.qqLoginBtn.frame = CGRectMake(60, 275, 160, 45);
    [self.qqLoginBtn setTitle:@"qq登录" forState:UIControlStateNormal];
    self.qqLoginBtn.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.qqLoginBtn.layer.cornerRadius = 10;
    self.qqLoginBtn.layer.masksToBounds = YES;
    [self.qqLoginBtn setBackgroundColor:[UIColor whiteColor]];
    self.qqLoginBtn.layer.borderColor = [UIColor redColor].CGColor;
    
    self.weiChatBtmn = [UIButton buttonWithType:UIButtonTypeSystem];
    self.weiChatBtmn.frame = CGRectMake(60, 340, 160, 45);
    [self.weiChatBtmn setTitle:@"微信登录" forState:UIControlStateNormal];
    self.weiChatBtmn.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.weiChatBtmn.layer.cornerRadius = 10;
    self.weiChatBtmn.layer.masksToBounds = YES;
    [self.weiChatBtmn setBackgroundColor:[UIColor whiteColor]];
    self.weiChatBtmn.layer.borderColor = [UIColor redColor].CGColor;
    [leftBackV addSubview:self.headerImageV];
    [leftBackV addSubview:self.clickBtn];
    [leftBackV addSubview:tLab];
    [leftBackV addSubview:self.sinaLoginBtn];
    [leftBackV addSubview:self.qqLoginBtn];
    [leftBackV addSubview:self.weiChatBtmn];
    [self.view addSubview:leftBackV];
    
}

-(void)setFootView{
    
    UIButton *setBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    setBtn.frame = CGRectMake(20, kScreenHeight - 60, 100, 40);
    [setBtn setTitle:@"设置" forState:UIControlStateNormal];
    setBtn.titleLabel.textAlignment = NSTextAlignmentCenter;
    setBtn.layer.cornerRadius = 10;
    setBtn.layer.masksToBounds = YES;
    [setBtn setBackgroundColor:[UIColor whiteColor]];
    setBtn.layer.borderColor = [UIColor redColor].CGColor;
    
    UIButton *nightBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    nightBtn.frame = CGRectMake(150, kScreenHeight - 60, 100, 40);
    [nightBtn setTitle:@"夜间" forState:UIControlStateNormal];
    nightBtn.titleLabel.textAlignment = NSTextAlignmentCenter;
    nightBtn.layer.cornerRadius = 10;
    nightBtn.layer.masksToBounds = YES;
    [nightBtn setBackgroundColor:[UIColor whiteColor]];
    nightBtn.layer.borderColor = [UIColor redColor].CGColor;
   
    [self.view addSubview:setBtn];
    [self.view addSubview:nightBtn];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
